<!--
	var xmlHttp;
	var signform = document.getElementById('signform');
	var inputforms = signform.getElementsByTagName('input');
	var textareaform = document.getElementsByTagName('textarea')[0];
	var validChars = "abcdefghijklmnopqrstuvwxyz0123456789";
	var nums = "0123456789";	
	
	window.onload = function(){
		inputforms[1].focus();
		disableform();
	}
	
	function validateYear(){
		var year = inputforms[7].value;
		if((year.length!=4)||(year<1900||year>2050)) {
			inputforms[7].value=="";		
		}
		for(var i=0;i<year.length;i++){		
			var yyy = year.charAt(i).toString();	
			var loc = nums.indexOf(yyy);
			if(loc==-1) {
				inputforms[7].value="";				
				break;
			}
		}
	}
	
	function validateMonth(){
		var month = inputforms[8].value;
		if(!(month>0&&month<13)) {
			inputforms[8].value="";			
		}
	}	
	
	function validateDay(){
	
		validateYear();
		validateMonth();
	
		var year = inputforms[7].value;
		var month = inputforms[8].value;
		var day = inputforms[9].value;
		
		if(month==2) {
			if(year%4==0) {
				if(!(day>0&&day<30)) {
					inputforms[9].value="";					
				}			
			} else {			
				if(!(day>0&&day<29)) {
					inputforms[9].value="";					
				}
			}
		} else if(month==4||month==6||month==9||month==11) {
			if(!(day>0&&day<31)) {
				inputforms[9].value="";				
			}
		} else {
			if(!(day>0&&day<32)) {
				inputforms[9].value="";				
			} 
		}
		
		var yy = inputforms[7].value;
		var mm = inputforms[8].value;
		var dd = inputforms[9].value;
		
		if((yy==null||yy=="")||(mm==null||mm=="")||(dd==null||dd=="")) {
			alert("생년월일을 정확하게 입력해 주세요.");
			inputforms[7].focus();
			return false;
		} else {
			var birthday = yy+"-"+mm+"-"+dd;
			document.getElementById('mbirth').value = birthday;
			return true;
		}
	
	}
	
	function disableform(){
		for(var i=2;i<inputforms.length;i++){
			inputforms[i].disabled = true;
		}
		textareaform.disabled = true;
	}
	
	function enableform(){
		for(var i=2;i<inputforms.length;i++){
			if(i!=3)	inputforms[i].disabled = false;
		}
		textareaform.disabled = false;
	}

	function passValidate(){
		var getPass = inputforms[2].value;
		if(getPass.length>3) inputforms[3].disabled = false;
		else inputforms[3].disabled = true;
	}

	function passConfirm(){
		if(inputforms[2].value!=inputforms[3].value){
			var responseDiv = document.getElementById('cpw');
			if(responseDiv.hasChildNodes()){
				for(var i=0;responseDiv.childNodes.length;i++){
					responseDiv.removeChild(responseDiv.childNodes[i]);			
				}
			}
			var warning = document.createElement('span');
			var message = document.createTextNode("패스워드를 확인해 주세요.");
			warning.appendChild(message);
			responseDiv.appendChild(warning);
			inputforms[3].value="";			
		} else {
			var responseDiv = document.getElementById('cpw');
			if(responseDiv.hasChildNodes()){
				for(var i=0;responseDiv.childNodes.length;i++){
					responseDiv.removeChild(responseDiv.childNodes[i]);			
				}
			}
		}
	}
	
	function validateID(){
		var mid = inputforms[1].value;
		for(var i=0;i<mid.length;i++){
			var letter = mid.charAt(i);
			if(validChars.indexOf(letter)==-1){
				inputforms[1].value="";
				inputforms[1].focus();
				return false;
			}
		}
		checkID();
	}
	
	function validateAll(){
		var mpass = inputforms[2].value;
		var mpass2 = inputforms[3].value;
		var mname = inputforms[4].value;
		var memail = inputforms[5].value;
		
		if(mpass==null||mpass==""){
			alert("패스워드를 입력해 주세요.");
			inputforms[2].focus();
			return false;
		}
		if(mpass.length<4) {
			alert("패스워드는 4자 이상 입력해 주세요.");
			inputforms[2].focus();
			return false;
		}
		if(mpass2==null||mpass2==""){
			passConfirm();
			inputforms[3].focus();
			return false;
		}		
		if(mname==null||mname==""){
			alert("이름을 입력해 주세요.");
			inputforms[4].focus();
			return false;
		}
		if(memail==null||memail==""){
			alert("이메일을 입력해 주세요.");
			inputforms[5].focus();
			return false;
		}
		validateDay();
	}
	
	function createXMLHttpRequest() {
	    if (window.ActiveXObject) {
	        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	    } 
	    else if (window.XMLHttpRequest) {
	        xmlHttp = new XMLHttpRequest();
	    }
	}
	
	function checkID(){
		var cid = inputforms[1].value;
		if(cid.length>3) {
			startRequest();
		} else {
			var responseDiv = document.getElementById('dup');
			if(responseDiv.hasChildNodes()){
				for(var i=0;responseDiv.childNodes.length;i++){
					responseDiv.removeChild(responseDiv.childNodes[i]);			
				}
			}
			var warning = document.createElement('span');
			var message = document.createTextNode("아이디는 영문/숫자 4자 이상입니다.");
			warning.appendChild(message);
			responseDiv.appendChild(warning);					
			disableform();
		}		
	}
			
	function startRequest() {		
		var getID = inputforms[1].value;
		var timeStamp = "&dummy="+new Date().getTime();		
		var url = "signinajax.do?method=validateMid&mid="+getID+timeStamp;
		createXMLHttpRequest();
	    xmlHttp.onreadystatechange = handleStateChange;
	    xmlHttp.open("GET", url, true);
	    xmlHttp.send(null);
	}
	
	function handleStateChange() {
	    if(xmlHttp.readyState == 4) {
	    	if(xmlHttp.status == 200){
	    		parseResponse();	       
			}	           
	    }
	}
	
	function parseResponse(){
		var responseDiv = document.getElementById('dup');
		if(responseDiv.hasChildNodes()){
			for(var i=0;responseDiv.childNodes.length;i++){
				responseDiv.removeChild(responseDiv.childNodes[i]);			
			}
		}
		var xmlDoc = xmlHttp.responseText;

		if(xmlDoc=="ok"){
			var warning = document.createElement('span');
			var message = document.createTextNode('사용할 수 있는 아이디입니다.');
			warning.appendChild(message);
			responseDiv.appendChild(warning);
			enableform();
		} else {
			var warning = document.createElement('span');
			var message = document.createTextNode('중복되는 아이디가 있습니다.');
			warning.appendChild(message);
			responseDiv.appendChild(warning);	
			disableform();
		}
		xmlHttp = null;
	}
//-->